package com.huwaiwai.map;

import java.util.LinkedHashMap;
import java.util.Map;

/**
 * @author 歪大哥😁
 * @date 2020/3/16.
 */
public class MyLinkedHashMap extends LinkedHashMap<String, Integer> {
    private static final int MAX = 5;

    public MyLinkedHashMap() {
        super(5, 1, true);
    }

    @Override
    protected boolean removeEldestEntry(Map.Entry eldest) {
        return size() > 5;
    }
}
